/*
 * Sprite.cpp
 *
 *  Created on: 08/01/2012
 *      Author: Mariano
 */

#include "Sprite.h"

Sprite::Sprite(SDL_Surface* texture, int frameCount, int spriteW, int spriteH) {
	this->texture = texture;
	this->frameCount = frameCount;
	this->spriteW = spriteW;
	this->spriteH = spriteH;
}

Sprite::~Sprite() {
}

int Sprite::getFrameCount() const {
	return frameCount;
}

int Sprite::getSpriteH() const {
	return spriteH;
}

int Sprite::getSpriteW() const {
	return spriteW;
}

SDL_Surface *Sprite::getTexture() const {
	return texture;
}

int Sprite::getActualFrame() const {
	return actualFrame;
}

void Sprite::nextFrame() {
	actualFrame = (actualFrame + 1) % frameCount;
}

void Sprite::setTexture(SDL_Surface *texture) {
	this->texture = texture;
}

